#ifndef INFORMATIONCONTROL_H
#define INFORMATIONCONTROL_H

#include <QtGui/QDialog>
#include <stdlib.h>
#include <QVector>
#include <QString>
#include <QDateTime>
#include <QFileDialog>
#include <QDir>
#include <QMessageBox>

namespace Ui {
    class InformationControl;
}

class InformationControl : public QDialog {
    Q_OBJECT
public:
    InformationControl(QWidget *parent = 0);
    ~InformationControl();

    // Return selected experiment file name
    QString getFile();
    // Return selected image folder
    QString getDir();
    // Return experiment's imbibition time
    QDateTime getStartDateTime();
    // Return interval of experiment images
    int getInterval();
    // Return if images include initial images
    bool isIncluded();


protected:
    void changeEvent(QEvent *e);

private slots:
    // Browse for experiment file with extension .txt or .sas
    void browse();
    // Locate image folder
    void locate();
    // Yes checkbox is clicked
    void setYes(int state);
    // Set imbibition datetime from datetimeedit
    void setDateTime(QDateTime dt);
    // Set interval of images, default is 1h
    void setInterval(int interval);
    // Update label to show current value in slider
    void showVal(int val);
    // When ok is pressed by user
    void ok();
    // When cancel is pressed
    void close();


private:
    Ui::InformationControl *m_ui;
    QString expFile;	// File name of experimental file
    QString imgFolder;	// Location of image files
    bool included;      // Image files include images at T0
    QDateTime start;    // Imbibition datetime of experiment
    int interval;       // Interval of experiment images
};

#endif // INFORMATIONCONTROL_H
